<template>
  <div class="time-line" ref="TimeLine"></div>
</template>
<script>
import * as echarts from "echarts";
let Option = {
  color: ["#00551F"],
  backgroundColor: "#1e2031",

  xAxis: {
    type: "category",
    splitLine: { show: true, lineStyle: { color: ["#2A2C3B"] } }
    // data: ["1", "2", "3", "4", "5", "6", "7"],
    // axisLabel: {
    //   formatter: "{value} 月"
    // }
  },
  yAxis: {
    splitLine: { show: true, lineStyle: { color: ["#2A2C3B"] } },
    type: "value"
    // axisLabel: {
    //   formatter: "{value} k"
    // }
  },
  series: [
    {
      // data: [5, 2, 5, 5, 4, 5, 5],
      type: "line",
      smooth: true,
      showSymbol: false,
      areaStyle: {}
    }
  ]
};
export default {
  name: "TimeLine",
  props: {},
  data() {
    return {};
  },
  created() {},
  methods: {
    buildChart(xAxis = [], series = []) {
      let myChart = echarts.init(this.$refs["TimeLine"]);
      Option.xAxis.data = xAxis;
      Option.series[0].data = series;
      myChart.setOption(Option);
    }
  },
  mounted: function() {}
};
</script>
<style lang="scss">
.time-line {
  width: 100%;
  height: 300px;
}
</style>
